using System;
using System.Collections;

namespace NUtil {
    public class Assert {
        public static void IsTrue(bool expression) {
            IsTrue(expression, String.Empty);
        }

        public static void IsFalse(bool expression) {
            IsTrue(!expression);
        }

        public static void IsFalse(bool expression, string message) {
            IsTrue(!expression, message);
        }

        public static void IsTrue(bool expression, string message) {
            if (!expression) {
                throw new ApplicationException("Assertion Failed");
            }
        }

        public static void ListIsEmptyAndNotNull(IList properties) {
            IsTrue(null != properties);
            IsTrue(0 == properties.Count);
        }
    }
}